package com.futao.springbootlearn20220224.aware;

import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.context.ServletContextAware;

import javax.servlet.ServletContext;

/**
 * @author futao@gmail.com
 * @date 2022/3/9
 */
@Component
@Slf4j
public class ServletContextAwareDemo implements ServletContextAware {
    @Override
    public void setServletContext(ServletContext servletContext) {
        log.info("servletContext:{}", JSON.toJSONString(servletContext, true));
    }
}
